package rkdwogus7.basic;

import java.io.*;
public class J05_NumberPiramid {

	public static void main(String[] args)
	throws NumberFormatException, IOException
	{
		while(true) {
			System.out.println("Enter the number of lines");
			BufferedReader u = new BufferedReader(new InputStreamReader(System.in));
			int n = Integer.parseInt(u.readLine());
			for(int i = 1; i <= n; i++)
			{
				for(int k = 1; k <= n-1; k++)
					System.out.print(" ");
				for(int j = i; j >= 1; j--)
					System.out.print((j >= 10) ? "" + j : "" + j);
				for(int p = 2; p <= i; p++)
					System.out.print((p >= 10) ? "" + p: "" +p);
				System.out.println();
			}
			if(n == -1) break;
			System.out.println("종료하려면 '-1' 입력");
		}

		
	}

}
